//
//  ZYProposalController.m
//  BestLearning
//
//  Created by Ethan on 2017/9/27.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "ZYProposalController.h"
#import "ZYProposealCell.h"
#define kCell @"cell"
@interface ZYProposalController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong) UITableView *tableView;
@property (nonatomic,strong) NSMutableArray *dataSource;

@end

@implementation ZYProposalController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"家长和孩子的意见";
    
    [self setUpSuperView];
    
}

- (void)setUpSuperView{
    
    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
    self.tableView.dataSource = self;
    self.tableView.delegate = self;
    [self.view addSubview:self.tableView];
    self.tableView.estimatedRowHeight = 200;
    
    [self.tableView registerClass:[ZYProposealCell  class] forCellReuseIdentifier:kCell];
    
    
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return 10;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ZYProposealCell *cell = [tableView dequeueReusableCellWithIdentifier:kCell forIndexPath:indexPath];
    

    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    
    if (0 == section) {
        return 20;
    }else{
        return 0;
    }
    
    
}

-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    UIImageView *view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 20)];
    view.image =[UIImage imageNamed:@"add_seg_large_default"];
    return view;
}










@end
